Optimal. Leaf size=119 \[ \frac {2 (c+d x)^2 \text {ArcTan}\left (e^{a+b x}\right )}{b}-\frac {2 i d (c+d x) \text {PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}+\frac {2 i d (c+d x) \text {PolyLog}\left (2,i e^{a+b x}\right )}{b^2}+\frac {2 i d^2 \text {PolyLog}\left (3,-i e^{a+b x}\right )}{b^3}-\frac {2 i d^2 \text {PolyLog}\left (3,i e^{a+b x}\right )}{b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4265, 2611,
2320, 6724} \begin {gather*} \frac {2 (c+d x)^2 \text {ArcTan}\left (e^{a+b x}\right )}{b}+\frac {2 i d^2 \text {Li}_3\left (-i e^{a+b x}\right )}{b^3}-\frac {2 i d^2 \text {Li}_3\left (i e^{a+b x}\right )}{b^3}-\frac {2 i d (c+d x) \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}+\frac {2 i d (c+d x) \text {Li}_2\left (i e^{a+b x}\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2320
Rule 2611
Rule 4265
Rule 6724
Rubi steps
\begin {align*} \int (c+d x)^2 \text {sech}(a+b x) \, dx &=\frac {2 (c+d x)^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {(2 i d) \int (c+d x) \log \left (1-i e^{a+b x}\right ) \, dx}{b}+\frac {(2 i d) \int (c+d x) \log \left (1+i e^{a+b x}\right ) \, dx}{b}\\ &=\frac {2 (c+d x)^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {2 i d (c+d x) \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}+\frac {2 i d (c+d x) \text {Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac {\left (2 i d^2\right ) \int \text {Li}_2\left (-i e^{a+b x}\right ) \, dx}{b^2}-\frac {\left (2 i d^2\right ) \int \text {Li}_2\left (i e^{a+b x}\right ) \, dx}{b^2}\\ &=\frac {2 (c+d x)^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {2 i d (c+d x) \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}+\frac {2 i d (c+d x) \text {Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac {\left (2 i d^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}-\frac {\left (2 i d^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}\\ &=\frac {2 (c+d x)^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {2 i d (c+d x) \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}+\frac {2 i d (c+d x) \text {Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac {2 i d^2 \text {Li}_3\left (-i e^{a+b x}\right )}{b^3}-\frac {2 i d^2 \text {Li}_3\left (i e^{a+b x}\right )}{b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 199, normalized size = 1.67 \begin {gather*} \frac {i \left (-2 i b^2 c^2 \text {ArcTan}\left (e^{a+b x}\right )+2 b^2 c d x \log \left (1-i e^{a+b x}\right )+b^2 d^2 x^2 \log \left (1-i e^{a+b x}\right )-2 b^2 c d x \log \left (1+i e^{a+b x}\right )-b^2 d^2 x^2 \log \left (1+i e^{a+b x}\right )-2 b d (c+d x) \text {PolyLog}\left (2,-i e^{a+b x}\right )+2 b d (c+d x) \text {PolyLog}\left (2,i e^{a+b x}\right )+2 d^2 \text {PolyLog}\left (3,-i e^{a+b x}\right )-2 d^2 \text {PolyLog}\left (3,i e^{a+b x}\right )\right )}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \left (d x +c \right )^{2} \mathrm {sech}\left (b x +a \right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 305 vs. \(2 (96) = 192\).
time = 0.37, size = 305, normalized size = 2.56 \begin {gather*} \frac {-2 i \, d^{2} {\rm polylog}\left (3, i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) + 2 i \, d^{2} {\rm polylog}\left (3, -i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) - 2 \, {\left (-i \, b d^{2} x - i \, b c d\right )} {\rm Li}_2\left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) - 2 \, {\left (i \, b d^{2} x + i \, b c d\right )} {\rm Li}_2\left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) + {\left (i \, b^{2} c^{2} - 2 i \, a b c d + i \, a^{2} d^{2}\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + i\right ) + {\left (-i \, b^{2} c^{2} + 2 i \, a b c d - i \, a^{2} d^{2}\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - i\right ) + {\left (-i \, b^{2} d^{2} x^{2} - 2 i \, b^{2} c d x - 2 i \, a b c d + i \, a^{2} d^{2}\right )} \log \left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right ) + 1\right ) + {\left (i \, b^{2} d^{2} x^{2} + 2 i \, b^{2} c d x + 2 i \, a b c d - i \, a^{2} d^{2}\right )} \log \left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right ) + 1\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right )^{2} \operatorname {sech}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,x\right )}^2}{\mathrm {cosh}\left (a+b\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________